:root {
    --primary-color: #4A6CF7;
    --primary-light: #E8EDFF;
    --success-color: #36D399;
    --warning-color: #FBBD23;
    --error-color: #F87272;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #E5E7EB;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
            radial-gradient(circle at 25% 25%, rgba(74, 108, 247, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 75% 75%, rgba(74, 108, 247, 0.05) 0%, transparent 50%);
    background-size: 100% 100%;
    background-attachment: fixed;
}

.login-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-image {
    width: 50%;
    background: linear-gradient(135deg, var(--primary-color), #6A8BFF);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path fill="%23ffffff" fill-opacity="0.1" d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z"></path></svg>');
}

.image-content {
    text-align: center;
    color: var(--bg-white);
    z-index: 1;
}

.image-content h2 {
    font-size: 28px;
    margin-bottom: 16px;
    font-weight: 600;
}

.image-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
}

.illustration {
    width: 100%;
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.login-form {
    width: 50%;
    padding: 48px;
    display: flex;
    flex-direction: column;
}

.form-header {
    margin-bottom: 32px;
    text-align: center;
}

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background-color: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 32px;
    box-shadow: var(--shadow-sm);
}

.form-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-header p {
    color: var(--text-tertiary);
    font-size: 14px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    position: relative;
    margin-bottom: 12px;
}

.form-input {
    width: 100%;
    height: 45px;
    padding: 8px 40px 8px 20px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: var(--bg-white);
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--text-tertiary);
    font-size: 14px;
}

.layui-input-affix {
    width: 45px;
    line-height: 45px;
}

.layui-input-suffix .layui-icon {
    color: var(--text-tertiary);
    font-size: 22px;
}

.form-options {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* 登录错误提示 */
.login-error {
    background-color: rgba(248, 114, 114, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: center;
}

/* 公告位 */
.announcement {
    background-color: rgba(54, 211, 153, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: center;
}

/* 安全认证标识 */
.security-certifications {
    margin-top: 32px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.security-icon {
    display: flex;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 12px;
    transition: var(--transition);
}

.security-icon:hover {
    color: var(--primary-color);
}

.security-icon i {
    margin-right: 6px;
    font-size: 14px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: #3A5CEA;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(74, 108, 247, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(74, 108, 247, 0.2);
}

.btn-primary:disabled {
    background-color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-footer {
    margin-top: 4px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    font-size: 12px;
    color: var(--text-tertiary);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.form-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        margin: 20px;
    }

    .login-image,
    .login-form {
        width: 100%;
    }

    .login-image {
        padding: 32px;
        min-height: 300px;
    }

    .login-form {
        padding: 32px;
    }

    .illustration {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .login-image {
        padding: 24px;
    }

    .login-form {
        padding: 24px;
    }

    .image-content h2 {
        font-size: 24px;
    }

    .form-header h1 {
        font-size: 20px;
    }

    .social-login {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 加载动画 */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}